// Common.hpp文件
#pragma once
#include <iostream>
#include <iostream>
#include <string>
#include <cstring>
#include <stdlib.h>
#include <sys/types.h>
#include <sys/socket.h>
#include <netinet/in.h>
#include <arpa/inet.h>

enum ExitCode
{
    normal = 0,
    SOCKET_ERR,
    BIND_ERR,
    LISTEN_ERR,
    USAGE_ERR,
    CONNECT_ERR,
    FORK_ERR
};

class NoCope
{
public:
    NoCope() {}
    NoCope(const NoCope &) = delete;                  // 拷贝构造
    const NoCope &operator=(const NoCope &) = delete; // 赋值
    ~NoCope() {}
};

#define CONV(add) ((struct sockaddr *)&add) // 定义宏